package com.example.springproject.xuwsh.controller;

import com.example.springproject.xuwsh.service.RedisTestService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: xuwsh
 * @Date: 2023/04/18/16:41
 * @Description:
 */
@RestController
@RequestMapping(value = "/redis")
public class RedisController {
    @Resource
    private RedisTestService redisTestService;

    @RequestMapping(value = "/test/test")
    public String redisTest() {
        redisTestService.setCacheObject("name", "xuwsh");
        return "成功";
    }
}
